package com.sz.zhiling.model;

import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;

public class TUsers {
    public TUsers() {
    }

    public TUsers(Integer uId) {
        this.uId = uId;
    }

    public TUsers(String uName, String uPwd, Integer uRid) {
        this.uName = uName;
        this.uPwd = uPwd;
        this.uRid = uRid;
    }

    public TUsers(Integer uId, String uName, String uPwd, Integer uRid) {
        this.uId = uId;
        this.uName = uName;
        this.uPwd = uPwd;
        this.uRid = uRid;
    }

    //自定义一个属性；
/*
    private String rname;    //角色名称！

    public String getRname() {
        return rname;
    }

    public void setRname(String rname) {
        this.rname = rname;
    }
*/

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_users.u_id
     *
     * @mbggenerated
     */
    @Id     //一定要在实体类的主键上写这两个注解！！！否则查不出来，更新不了。
    @KeySql(useGeneratedKeys = true)
    private Integer uId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_users.u_name
     *
     * @mbggenerated
     */
    private String uName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_users.u_pwd
     *
     * @mbggenerated
     */
    private String uPwd;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_users.u_rid
     *
     * @mbggenerated
     */
    private Integer uRid;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_users.u_id
     *
     * @return the value of t_users.u_id
     *
     * @mbggenerated
     */
    public Integer getuId() {
        return uId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_users.u_id
     *
     * @param uId the value for t_users.u_id
     *
     * @mbggenerated
     */
    public void setuId(Integer uId) {
        this.uId = uId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_users.u_name
     *
     * @return the value of t_users.u_name
     *
     * @mbggenerated
     */
    public String getuName() {
        return uName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_users.u_name
     *
     * @param uName the value for t_users.u_name
     *
     * @mbggenerated
     */
    public void setuName(String uName) {
        this.uName = uName == null ? null : uName.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_users.u_pwd
     *
     * @return the value of t_users.u_pwd
     *
     * @mbggenerated
     */
    public String getuPwd() {
        return uPwd;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_users.u_pwd
     *
     * @param uPwd the value for t_users.u_pwd
     *
     * @mbggenerated
     */
    public void setuPwd(String uPwd) {
        this.uPwd = uPwd == null ? null : uPwd.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_users.u_rid
     *
     * @return the value of t_users.u_rid
     *
     * @mbggenerated
     */
    public Integer getuRid() {
        return uRid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_users.u_rid
     *
     * @param uRid the value for t_users.u_rid
     *
     * @mbggenerated
     */
    public void setuRid(Integer uRid) {
        this.uRid = uRid;
    }


    @Override
    public String toString() {
        return "TUsers{" +
                "uId=" + uId +
                ", uName='" + uName + '\'' +
                ", uPwd='" + uPwd + '\'' +
                ", uRid=" + uRid +
                '}';
    }
}